﻿using Common.Prism.Events;
using Prism.Regions;

namespace Common.Prism.Apps
{
    public class BaseDialogViewModel : BaseViewModel, INavigationAware
    {
        public bool IsNavigationTarget(NavigationContext navigationContext)
        {
            return true;
        }

        public void OnNavigatedFrom(NavigationContext navigationContext)
        {

        }

        public virtual void OnNavigatedTo(NavigationContext navigationContext)
        {

        }

        public override void RequestClose()
        {
            Global.EventAggregator.GetEvent<DialogEvent>().Publish(null);
        }
    }
}
